<?php

namespace app\test\controller;

use app\common\controller\TokenBase;
use org\Crypt3despk7;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        $c3d7 = new Crypt3despk7(config('c3d7.key'), config('c3d7.iv'));
        $data = [];
        $data['app_id'] = 1;
        $data['app_secret'] = '3256343d5a68e552101291a5c8632df3';
        $data['uid'] = 1;
        $tokenBase = new TokenBase();
        $data['token'] = $tokenBase->getToken(1, 1);
        $json = json_encode($data);
        $enc = $c3d7->encrypt($json);
        echo $enc;
        return $this->fetch();
    }
}